<%@page import="com.google.appengine.api.datastore.Entity"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<%
    String nombres = "";
    Entity user = (Entity) request.getAttribute("user");
    if (user != null) {

        nombres = user.getProperty("nombres").toString();
    }

%>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <meta name="description" content="">
        <meta name="author" content="">
        <link rel="shortcut icon" href="../../assets/ico/favicon.png">

        <title>UpaoCommons 1.0</title>

        <!-- Bootstrap core CSS -->
        <link href="../../dist/css/bootstrap.css" rel="stylesheet">

        <!-- Custom styles for this template -->
        <link href="jumbotron.css" rel="stylesheet"/>

        <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
        <!--[if lt IE 9]>
          <script src="../../assets/js/html5shiv.js"></script>
          <script src="../../assets/js/respond.min.js"></script>
        <![endif]-->
        <script type="text/javascript" src="scripts/ddsmoothmenu.js"></script>
        <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
        <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
        <script>
            $(document).ready(function() {
                $("#datepicker").datepicker();
                $('#datepicker').datepicker('option', {dateFormat: 'dd/mm/yy'});
                // $("#startDate").datepicker({dateFormat: 'dd/mm/yy'});
            });
        </script>

    </head>

    <body>
        <div class="navbar navbar-inverse navbar-fixed-top">
            <div class="container">
                <div class="navbar-header">
                    <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                    </button>
                    <a class="navbar-brand" href="#">UPAO COMMONS</a>
                </div>
                <div class="navbar-collapse collapse">
                    <ul class="nav navbar-nav">
                        <li class="active"><a href="../index.jsp">Inicio</a></li>
                        <li><a href="#about">Nosotros</a></li>
                        <li><a href="#contact">Contacto</a></li>
                        <li class="dropdown">
                            <a href="#" class="dropdown-toggle" data-toggle="dropdown">Servicios <b class="caret"></b></a>
                            <ul class="dropdown-menu">
                                <li><a href="#">Action</a></li>
                                <li><a href="#">Another action</a></li>
                                <li><a href="#">Something else here</a></li>
                                <li class="divider"></li>
                                <li class="dropdown-header">Nav header</li>
                                <li><a href="#">Separated link</a></li>
                                <li><a href="#">One more separated link</a></li>
                            </ul>
                        </li>
                    </ul>
                    <form class="navbar-form navbar-right" method="post" action="/user">
                        <div class="form-group">
                            <input type="text" readonly="" placeholder="Correo" value="Bienvenido(a): <%=nombres%>" class="form-control"/>
                        </div>
                        <input type="hidden" name="action" value="logOutUser"/>
                        <button type="submit" class="btn btn-success">Cerrar Sesión</button>
                    </form>
                </div><!--/.navbar-collapse -->
            </div>
        </div>

        <%--Cuerpo del formulario--%>
        <br>
        <br>
        <br>
        <br>
        <br>
        <div style="float: left;margin-left: 100px;width:150px" >
            <ul class="nav nav-pills nav-stacked">
                <li><a href="/curso?action=cambioPagina&nombres=<%=nombres%>&path=/JSP/DashBoard.jsp">Inicio</a></li>
                <li class="active"><a>Cursos</a></li>
                <li><a href="#">Correo</a></li>
                <li><a href="/instructor?action=getAllInstructores&nombres=<%=nombres%>">Instructores</a></li>
                <li><a>Configuración</a></li>
                <li><a href="#">Ayuda</a></li>
            </ul>
        </div>
        <div class="jumbotron" style="float:left; width:810px; height: 710px; margin-left: 80px">
            <div class="panel panel-default">
                <!-- Default panel contents -->
                <div class="panel-heading"><b>Crear nuevo curso</b></div>
                <div class="panel-body">
                    <form method="post" action="/curso">
                        <table style="font-size: smaller">
                            <tr>
                                <th>
                                    <label>Categoría</label>
                                </th>
                                <th></th>
                                <td>:</td>
                                <td>
                                    <select style="margin-left: 50px;width: 350px" class="combobox input-large" name="categoria">
                                        <option value="Aeronautics and Astronautics">Aeronautics and Astronautics</option>
                                        <option value="Anthropology">Anthropology</option>
                                        <option value="Architecture">Architecture</option>
                                        <option value="Automotive">Automotive</option>
                                        <option value="Biology">Biology</option>
                                        <option value="Business and Management">Business and Management</option>
                                        <option value="Chemistry">Chemistry</option>
                                        <option value="Civil and Environmental Engineering">Civil and Environmental Engineering</option>
                                        <option value="Communication">Communication</option>
                                        <option value="Comparative Media Studies">Comparative Media Studies</option>
                                        <option value="Criminal Justice">Criminal Justice</option>
                                        <option value="Culinary Arts">Culinary Arts</option>
                                        <option value="Earth Atmospheric and Planetary Sciences">Earth Atmospheric and Planetary Sciences</option>
                                        <option value="Economics">Economics</option>
                                        <option value="Education">Education</option>
                                        <option value="Electrical Engineering and Computer Science">Electrical Engineering and Computer Science</option>
                                        <option value="Elementary Math">Elementary Math</option>
                                        <option value="Elementary Reading">Elementary Reading</option>
                                        <option value="Elementary Spelling">Elementary Spelling</option>
                                        <option value="Environmental Studies">Environmental Studies</option>
                                        <option value="Foreign Languages">Foreign Languages</option>
                                        <option value="Health Sciences">Health Sciences</option>
                                        <option value="History">History</option>
                                        <option value="Hobbies">Hobbies</option>
                                        <option value="Homeschool">Homeschool</option>
                                        <option value="Hospitality">Hospitality</option>
                                        <option value="How-to">How-to</option>
                                        <option value="Journalism">Journalism</option>
                                        <option value="Library Science">Library Science</option>
                                        <option value="Linguistics">Linguistics</option>
                                        <option value="Literature">Literature</option>
                                        <option value="Materials Science and Engineering">Materials Science and Engineering</option>
                                        <option value="Mathematics">Mathematics</option>
                                        <option value="Mechanical Engineering">Mechanical Engineering</option>
                                        <option value="Media Arts">Media Arts</option>
                                        <option value="Miscellaneous">Miscellaneous</option>
                                        <option value="Music and Theater Arts">Music and Theater Arts</option>
                                        <option value="Nuclear Science and Engineering">Nuclear Science and Engineering</option>
                                        <option value="Nursing">Nursing</option>
                                        <option value="Nutrition">Nutrition</option>
                                        <option value="Philosophy">Philosophy</option>
                                        <option value="Physical Education">Physical Education</option>
                                        <option value="Physics">Physics</option>
                                        <option value="Political Science">Political Science</option>
                                        <option value="Psychology">Psychology</option>
                                        <option value="Religion and Spirituality">Religion and Spirituality</option>
                                        <option value="Self-help">Self-help</option>
                                        <option value="Sociology">Sociology</option>
                                        <option value="Systems Engineering">Systems Engineering</option>
                                        <option value="Test-Prep">Test-Prep</option>
                                        <option value="Trades">Trades</option>
                                        <option value="Unit Studies">Unit Studies</option>
                                        <option value="Urban Studies and Planning">Urban Studies and Planning</option>
                                        <option value="Womens and Gender Studies">Womens and Gender Studies</option>
                                        <option value="Writing">Writing</option>
                                    </select>
                                </td>
                            </tr>
                            <tr>
                                <th>
                                    <label>Nombre del curso</label>
                                </th>
                                <th></th>
                                <td>:</td>
                                <td>
                                    <input style="margin-left: 50px;width: 350px" type="text" class="form-control" id="name" value="" name="nombre_curso"/>
                                </td>
                            </tr>
                            <tr>
                                <th>
                                    <label>URL</label>
                                </th>
                                <th></th>
                                <td>:</td>
                                <td>
                                    <input style="margin-left: 50px;width: 350px" type="text" class="form-control"  id="urlid" value="" name="url"/>
                                </td>
                            </tr>
                            <tr>
                                <th>
                                    <label>Tipo de curso</label>
                                </th>
                                <th></th>
                                <td>:</td>
                                <td>
                                    <span>
                                        <input style="margin-left: 50px" checked="checked" type="radio" id="voting_enabled1" value="Tradicional" name="cb_tipo_curso"/> Tradicionales (instructor maneja los contenidos del curso) <br />
                                        <input  style="margin-left: 50px" type="radio" id="voting_enabled2" value="Wiki" name="cb_tipo_curso"/> Wiki (Cualquiera puede añadir contenidos al curso)
                                    </span>
                                </td>
                            </tr>
                            <tr>
                                <th>
                                    <label>Acceso</label>
                                </th>
                                <th></th>
                                <td>:</td>
                                <td>
                                    <span>
                                        <input style="margin-left: 50px" checked="checked" style="margin-left: 50px"  type="radio" id="payment_required1" value="Publico" name="cb_acceso_curso"/> Público (Cualquiera puede participar) <br />
                                        <input style="margin-left: 50px"  type="radio" id="payment_required2" value="Privado" name="cb_acceso_curso"/> Privado (Sólo con invitación)
                                    </span>
                                </td>
                            </tr>
                            <tr>
                                <th>
                                    <label>Descripción</label>
                                </th>
                                <th></th>
                                <td>:</td>
                                <td>
                                    <textarea style="margin-left: 50px;width: 350px" id="description" class="form-control" rows="8" name="descripcion"></textarea>
                                </td>
                            </tr>
                        </table>
                        <input type="hidden" name="action" value="createCurso"/>
                        <input type="hidden" name="nombre_user" value="<%=nombres%>"/>
                        <center><input style="height: 40px;font-size: medium" class="btn btn-primary btn-success" type="submit" value="Crear"/>
                        </center>
                    </form>
                       <%-- <input style="height: 40px;font-size: medium" class="btn btn-primary btn-success" type="submit" value="Volver"/>--%>
                </div>
            </div>  
        </div>
    </body>
</html>